package cn.yzgy.yzgyoa.common.controller;

import cn.yzgy.yzgyoa.common.annotation.ApiDesc;
import cn.yzgy.yzgyoa.common.annotation.Syslog;
import cn.yzgy.yzgyoa.common.config.BuildVersionConfiguration;
import cn.yzgy.yzgyoa.common.crsp.Urmf;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Yqsen
 */
@Syslog
@RestController
@RequestMapping("sys")
public class SystemInfoController extends BaseController{

    private final BuildVersionConfiguration buildVersionConfiguration;

    public SystemInfoController(BuildVersionConfiguration buildVersionConfiguration) {
        this.buildVersionConfiguration = buildVersionConfiguration;
    }

    @ApiDesc("获取Build版本")
    @GetMapping("version")
    public Urmf getBuildNumber() {
        return Urmf.success(getCurrentMethodName(), buildVersionConfiguration);
    }


}
